-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix freeze on add title text #24816
Fix freeze on add title text #24816
Conversation
@mike-spa Tested on Win/Mac. I still can crash with these steps (and that score):
bandicam.2024-09-20.14-10-14-187.mp4 |
504ad41
to
463bbc5
Compare
@DmitryArefiev should be fixed! |
@mike-spa Found another one.. Can you check it also?
bandicam.2024-09-20.18-40-01-231.mp4 |
463bbc5
to
cb8ae88
Compare
@DmitryArefiev I'm copying your steps but I really can't reproduce this last one. I've rebased the branch, could you check again with the new build? |
@mike-spa I still can't reproduce with that score. But also, I found a score that crashes with the similar steps and the crash doesn't occur in master. Please try it:
bandicam.2024-09-23.15-56-54-884.mp4 |
cb8ae88
to
7ce9c1c
Compare
Here's the situation. There is this piece of code from here which is clearly wrong (for example, it causes an unnecessary frame to be added to the main score in the file from the original issue). Moreover this line creates spurious duplicate links between the title frames. In debug builds, this causes an assertion failure which was preventing me to even get to the actual issue I was trying to fix, so I tried to fix this code as well. However, it turns out that creating those wrong duplicate links, by pure coincidence, prevents the crash that @DmitryArefiev found in the last video. That crash has a much deeper and much more complex cause which can't be fixed in a patch release. So, long story short, I've given up on fixing that piece of code, and left in just the bare minimum solution which fixes the linked issue. This should avoid the crashes. And about that last crash, I'll log a separate issue. |
Fix freeze on add title text
Resolves: #24795
The problem is two-fold. First: the program was getting stuck on a loop because, after adding a new VBox, it was trying to move the staff type changes by a given tick difference, but the VBox has zero tick so the loop was never progressing. Second: the VBox shouldn't be actually added because one is already there. The reason it was being added is that there is an empty part that doesn't have the title VBox, and adding it to the part was also creating it in the score.